#pragma once
#include"./Util.hpp"
#include"./Level.hpp"
#include<ctime>
#include<thread>

namespace zlog
{
    struct LogMsg
    {
            LogMsg(LogLevel::value level,size_t line,\
                const string& file,\
                const string& logger,\
                const string& playload)
            :ctime(Util::Date::getTime()),
            _level(level),
            _line(line),
            _tid(std::this_thread::get_id()),
            _file(file),
            _logger(logger),
            _playload(playload)
          {}
          
        time_t ctime; //日志产生的时间戳
        LogLevel::value _level; //日志等级
        size_t _line; //行号
        std::thread::id _tid; //线程id
        string _file; //源代码文件名
        string _logger; //日志器名称
        string _playload; //有效消息数据 
    };

}